package com.office.workflow.domain;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.office.common.annotation.Excel;
import com.office.common.core.domain.BaseEntity;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import java.util.Date;

/**
 * 工作流连线对象 workflow_link
 * 
 * @author 数字牧马人
 */
public class WorkflowLink extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 连线ID */
    private Long id;

    /** 工作流ID */
    private Long workflowId;

    /** 连线唯一标识 */
    @Excel(name = "连线标识")
    private String linkId;

    /** 起始节点ID */
    @Excel(name = "起始节点")
    private String fromNodeId;

    /** 目标节点ID */
    @Excel(name = "目标节点")
    private String toNodeId;

    /** 条件表达式 */
    @Excel(name = "条件表达式")
    private String condition;

    /** 条件描述 */
    @Excel(name = "条件描述")
    private String conditionDesc;

    /** 连线属性(JSON格式) */
    private String attr;

    public void setId(Long id) 
    {
        this.id = id;
    }

    public Long getId() 
    {
        return id;
    }

    public void setWorkflowId(Long workflowId) 
    {
        this.workflowId = workflowId;
    }

    public Long getWorkflowId() 
    {
        return workflowId;
    }

    public void setLinkId(String linkId) 
    {
        this.linkId = linkId;
    }

    public String getLinkId() 
    {
        return linkId;
    }

    public void setFromNodeId(String fromNodeId) 
    {
        this.fromNodeId = fromNodeId;
    }

    public String getFromNodeId() 
    {
        return fromNodeId;
    }

    public void setToNodeId(String toNodeId) 
    {
        this.toNodeId = toNodeId;
    }

    public String getToNodeId() 
    {
        return toNodeId;
    }

    public void setCondition(String condition) 
    {
        this.condition = condition;
    }

    public String getCondition() 
    {
        return condition;
    }

    public void setConditionDesc(String conditionDesc) 
    {
        this.conditionDesc = conditionDesc;
    }

    public String getConditionDesc() 
    {
        return conditionDesc;
    }

    public void setAttr(String attr) 
    {
        this.attr = attr;
    }

    public String getAttr() 
    {
        return attr;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("workflowId", getWorkflowId())
            .append("linkId", getLinkId())
            .append("fromNodeId", getFromNodeId())
            .append("toNodeId", getToNodeId())
            .append("condition", getCondition())
            .append("conditionDesc", getConditionDesc())
            .append("attr", getAttr())
            .append("createTime", getCreateTime())
            .append("updateTime", getUpdateTime())
            .toString();
    }
} 